#include <stdio.h>

#define MAX_SQUARES 200
#define MAX_NUMBER  10000
#define INFINITY    1000000000

static int board[MAX_SQUARES+1];    /* square 0 is the starting position */
static int num_squares, max_advance, max_turns;
static int rebate[MAX_SQUARES+2][MAX_SQUARES+2];

#define Max(a, b) ((a) > (b)? (a) : (b))
#define Min(a, b) ((a) < (b)? (a) : (b))

static int solve()
{
    /* rebate[i][j] is the maximum possible rebate when you are currently
     * on square i (starting position is square 0) and are allowed to roll
     * j turns.
     */
    int i, turns;

    for (turns = 0; turns <= max_turns; turns++)
        rebate[num_squares+1][turns] = 0;
    
    for (i = num_squares; i >= 0; i--)
    {
        for (turns = 1; turns <= max_turns; turns++) // To be improved
        {
            int max_rebate = -INFINITY;
            int advance = Min(max_advance, num_squares + 1 - i);
            for (; advance >= 1; advance--)
                max_rebate = Max(max_rebate, rebate[i+advance][turns-1]);
            rebate[i][turns] = board[i] + max_rebate;
        }
        rebate[i][0] = -INFINITY;
    }
    return rebate[0][max_turns];
}

int main()
{
    while (scanf("%d %d %d", &num_squares, &max_advance, &max_turns) == 3)
    {
        int i;
        for (i = 1; i <= num_squares; i++)
            scanf("%d", &board[i]);
        board[0] = 0;
        printf("%d\n", solve());
    }
    return 0;
}
